package com.haker.mensa2;

import android.app.Activity;
import android.content.ComponentName;
import android.content.Intent;
import android.os.Bundle;
import android.widget.AdapterView;
import android.widget.GridView;
import android.widget.TextView;
import android.widget.Toast;
import android.widget.AdapterView.OnItemClickListener;
import android.view.View;



public class Mensa2 extends Activity {
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.grid);

   GridView gridview = (GridView) findViewById(R.id.gridview);
    start_Adapter ada = new start_Adapter(this);
    gridview.setAdapter(ada);
    gridview.setOnItemClickListener(new OnItemClickListener() 
    {
        public void onItemClick(AdapterView parent, 
        View v, int position, long id) 
        {                Intent i = new Intent();
       
        i.setClass(Mensa2.this, TUHHMensa.class);
        startActivity(i);
            /*Toast.makeText(getBaseContext(), 
                    "pic" + (position + 1) + " selected", 
                    Toast.LENGTH_SHORT).show();*/
        }
    });        
    
       
}

}
